package com.goldplusgold.tradedelay.app.trade.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;

import com.goldplusgold.support.lib.base.activity.BaseActivity;
import com.goldplusgold.tradedelay.app.trade.fragment.TradeWebViewFragment;
import com.goldplusgold.support.lib.utils.FragmentManagerUtil;

/**
 * Created by admin on 2017/5/15.
 */

public class TradeWebViewActivity extends BaseActivity {
    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent intent = getIntent();
        if (intent != null && intent.hasExtra("url")) {
            String url = getIntent().getStringExtra("url");
            switchFragment(url);
        }

    }

    public void switchFragment(String url) {
        FragmentManagerUtil.getInstance().openFragment(this, TradeWebViewFragment.newInstance(url,2), true);
    }


}
